Class CurrencyFormat

Summary

Fully Qualified Name: Laminas\I18n\View\Helper\CurrencyFormat
Extends: AbstractHelper

Description

View helper for formatting currency.

Methods

Name Description Defined By
__construct() CurrencyFormat
__invoke() Format a number CurrencyFormat
getCurrencyCode() Get the 3-letter ISO 4217 currency code indicating the currency to use CurrencyFormat
getCurrencyPattern() Get the currency pattern CurrencyFormat
getLocale() Get the locale to use CurrencyFormat
getView() Get the view object AbstractHelper
setCurrencyCode() The 3-letter ISO 4217 currency code indicating the currency to use CurrencyFormat
setCurrencyPattern() Set the currency pattern CurrencyFormat
setLocale() Set locale to use instead of the default CurrencyFormat
setShouldShowDecimals() Set if the view helper should show two decimals CurrencyFormat
setView() Set the View object AbstractHelper
shouldShowDecimals() Get if the view helper should show two decimals CurrencyFormat

Method Details

__construct()

Returns:

__invoke()

Format a number

Parameter Name Type Description
$number float
$currencyCode string|null
$showDecimals bool|null
$locale string|null
$pattern string|null

Returns: string

getCurrencyCode()

Get the 3-letter ISO 4217 currency code indicating the currency to use

Returns: string

getCurrencyPattern()

Get the currency pattern

Returns: string

getLocale()

Get the locale to use

Returns: string

getView()

Get the view object

Returns: null|\Renderer

setCurrencyCode()

The 3-letter ISO 4217 currency code indicating the currency to use

Parameter Name Type Description
$currencyCode string

Returns: $this

setCurrencyPattern()

Set the currency pattern

Parameter Name Type Description
$currencyPattern string

Returns: $this

setLocale()

Set locale to use instead of the default

Parameter Name Type Description
$locale string

Returns: $this

setShouldShowDecimals()

Set if the view helper should show two decimals

Parameter Name Type Description
$showDecimals bool

Returns: $this

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

shouldShowDecimals()

Get if the view helper should show two decimals

Returns: bool

Top